/**
 *
 */
package st.yushao.restaurant.dao.hibernateImpl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import st.yushao.restaurant.dao.RestDaoService;
import st.yushao.restaurant.vo.RestaurantVO;


/**
 * @author acer
 */
public class RestDaoServiceHibImpl extends HibernateDaoSupport implements RestDaoService {

    public List<RestaurantVO> getRestList() {
        return (List<RestaurantVO>) getHibernateTemplate().find("from RestaurantVO");
    }

    @Override
    public RestaurantVO getRestById(int restId) {
        return getHibernateTemplate().get(RestaurantVO.class, restId);
    }
}
